﻿using System.Collections.Generic;
using System.Threading.Tasks;

namespace Shared.Service.Authorizations.Authorization.HttpApis
{
    public interface IDataScopesHttpApi
    {
        /// <summary>
        /// 获取用户和用户策略的数据范围
        /// </summary>
        /// <param name="params"></param>
        /// <returns></returns>
        Task<Dictionary<string, string[]>> GetUserDataScopesAsync(GetUserDataScopesRequest @params);

        /// <summary>
        /// 判断一个用户是否有该功能的权限
        /// </summary>
        /// <param name="params"></param>
        /// <returns></returns>
        Task<PermissionGrantResult> IsGrantedAsync(GetIsGrantedRequest @params);
    }
}
